/*
 * @ProjectName: 编程学习
 * @Copyright:   2019 HangZhou Yi Dev, Ltd. All Right Reserved.
 * @address:     https://yiyuery.github.io/
 * @date:        2019/5/20 20:57
 * @email:       xiazhaoyang@live.com
 * @description: 本内容仅限于编程技术学习使用，转发请注明出处.
 */
package com.yi.yier.boot.autoconfigure.codegenerator.api.service.mybatis;


import org.apache.ibatis.annotations.Param;
import tk.mybatis.mapper.additional.dialect.oracle.InsertListMapper;
import tk.mybatis.mapper.common.BaseMapper;
import tk.mybatis.mapper.common.ConditionMapper;
import tk.mybatis.mapper.common.IdsMapper;

import java.util.List;

/**
 * <p>
 *
 * </p>
 *
 * @author Yi
 * @version v1.0.0
 * @date 2019-06-29 21:27
 * @modificationHistory=========================逻辑或功能性重大变更记录
 * @modify By: {修改人} 2019-06-29
 * @modify reason: {方法名}:{原因}
 * ...
 */
public interface BaseMybatisMapper<Record, Example> extends BaseMapper<Record>, ConditionMapper<Record>, IdsMapper<Record>, InsertListMapper<Record> {

    long countByExample(Example example);

    int deleteByExample(Example example);

    <T> int deleteById(T recordId);

    List<Record> selectByExample(Example example);

    <T> Record selectById(T recordId);

    int updateByExampleSelective(@Param("record") Record record, @Param("example") Example example);

    int updateByExample(@Param("record") Record record, @Param("example") Example example);

    int insertListSelective(List<Record> records);

    int updateListByPrimaryKey(List<Record> records);
}
